# -*- encoding: utf-8 -*-

from Common.mysql import db, ma
from sqlalchemy.dialects.mysql import LONGTEXT


# 新建表api_info
class ApiCase(db.Model):
    __tablename__ = 'api_case'  # 数据库名称
    id = db.Column(db.Integer, primary_key=True)
    caseName = db.Column(db.String(64), unique=True, index=True)  # 索引
    projectId = db.Column(db.String(64))
    projectName = db.Column(db.String(64))
    requestInfo = db.Column(LONGTEXT)
    status = db.Column(db.Integer)
    create_time = db.Column(db.DATETIME)
    create_user = db.Column(db.String(64))
    update_time = db.Column(db.DATETIME)
    update_user = db.Column(db.String(64))


class ApiCaseSchema(ma.SQLAlchemyAutoSchema):
    class Meta:
        model = ApiCase
